/*
 * RegExpUtil.cpp
 *
 *  Created on: 2011-1-29
 *      Author: Administrator
 */

#include "RegExpUtil.h"
#include "FileUtil.h"

_LIT(KLogFileName,"c:\\data\\nbanews.log");

CGamblings* CRegExpUtil::RegExpGamblingsFromHtmlL(const TDesC8& aHtml)
	{
	CFileUtil::WriteFileL(KLogFileName,aHtml);
	
	CGamblings* Gamblings = new CGamblings();
	
	CGamblingCompany* Company = new CGamblingCompany();
	Company->setNameL(_L("\u6fb3\u95e8"));
	Gamblings->iGamblingCompanys.AppendL(Company);
	
	return Gamblings;
	}

CRacesCard* CRegExpUtil::RegExpRacesCardFromHtmlL(const TDesC8& aHtml)
	{
	CRacesCard* races = new CRacesCard();
	
	CRace* race = new CRace();
	race->setTeam1L(_L("\u6b65\u884c\u8005"));
	race->setTeam2L(_L("\u6e56\u4eba"));
	race->setScore1L(_L("102"));
	race->setScore2L(_L("112"));
	race->setStartTimeL(_L("8:00"));
	race->setStateL(_L("game over"));
	races->iRaces.AppendL(race);
	
	return races;
	}
